home *** CD-ROM | disk | FTP | other *** search
- package COM.compuserve.rpa.sspi;
-
- public class ClientContext {
- public static final String RPA_Version = "v3.01 (168)";
- public static final int SUCCESS = 0;
- public static final int CONTINUE_NEEDED = 1;
- public static final int FAILED = 2;
- public static final int INTERNAL_ERROR = 3;
- private boolean firstTime = true;
- private int contextLo;
- private int contextHi;
- private int credentialsLo;
- private int credentialsHi;
- private int maxTokenSize;
- private int outTokenSize;
- private String serverName;
-
- public ClientContext(String var1) throws SecurityException {
- this.serverName = var1;
- if (this.initialize() != 0) {
- throw new SecurityException("RPA");
- }
- }
-
- public int getMaxTokenSize() {
- return this.maxTokenSize;
- }
-
- public int getOutTokenSize() {
- return this.outTokenSize;
- }
-
- public native int doHandshake(byte[] var1, int var2, byte[] var3);
-
- protected synchronized void finalize() {
- this.terminate();
- }
-
- private native int initialize();
-
- private native void terminate();
-
- static {
- try {
- SecurityManager.setScopePermission();
- System.loadLibrary("jrpasspc");
- SecurityManager.resetScopePermission();
- } catch (NoSuchMethodError var0) {
- if (System.getProperty("java.vendor").indexOf("Microsoft") != -1) {
- if (System.getProperty("os.version").indexOf("3.1") != -1) {
- System.loadLibrary("jrpa");
- } else {
- System.loadLibrary("msjrpa32");
- }
- } else {
- System.loadLibrary("jrpasspc");
- }
-
- }
- }
- }
-